package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;


@Mapper
@Component
public interface DishFlavorMapper {

    @Insert(" Insert into dish_flavor (dish_Id, name, value) values (#{dishid}, #{name}, #{value}) ")
    void saveDishFlavor(DishFlavor dishFlavor);

    @Select(" select * from dish_flavor where dish_Id =#{id} ")
    List<DishFlavor> getDishFlavor(Long id);

    //删除 根据dish_Id 删除
    @Delete(" delete from dish_flavor where dish_Id = #{id} ")
    void deletById(Long id);
}
